/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb.person;

import enteties.person.SupplierFacadeLocal;
import java.util.Collection;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import util.person.SupplierDetails;

/**
 *
 * @author Gebruiker
 */
@Stateless
public class SupplierBean implements SupplierBeanRemote {
    @EJB
    private SupplierFacadeLocal supplierFacade;
    
    @Override
    public Integer createSupplier(String name, Integer number, Collection<Long> telecom, Integer languageid, Long addressid){
        return supplierFacade.createSupplier(name, number, telecom, languageid, addressid);
    }
    
    @Override
    public void editSupplier(Integer id, String name, Integer number, Collection<Long> telecom, Integer languageid, Long addressid){
        supplierFacade.editSupplier(id, name, number, telecom, languageid, addressid);
    }
    
    @Override
    public void removeSupplier(Integer id){
        supplierFacade.removeSupplier(id);
    }
    
    @Override
    public boolean exists(Integer number){
        return supplierFacade.exists(number);
    }
    
    @Override
    public SupplierDetails findByNumber(Integer number) {
        return supplierFacade.findByNumber(number);
    }
    
    @Override
    public SupplierDetails getSupplierDetails(Integer id){
        return supplierFacade.getSupplierDetails(id);
    }
    
    @Override
    public Collection<SupplierDetails> getAllSupplierDetails(){
        return supplierFacade.findAllSuppliers();
    }
    
    @Override
    public void addTelecomToSupplier(Integer supplierId, Integer TelecomId){
        supplierFacade.addTelecomToSupplier(supplierId, TelecomId);
    }
    

}
